/*
* Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
*/
#ifndef VPC_CMDLIST_PIPELINE_TOP_H
#define VPC_CMDLIST_PIPELINE_TOP_H

#include "pipeline_module.h"
struct PipleLineTop {
    enum VpcPictureFormat kernelFmt;
    enum ChannelOutType channelOut;
};

struct PipeLineInput {
    struct Swap in0Swap;
    struct UvUp in0Uvup;
    struct Csc in0Csc;
    struct UvDown in0UvDown;
    struct Swap in1Swap;
    struct UvUp in1Uvup;
    struct Csc in1Csc;
    struct UvDown in1UvDown;
};

struct PipeLineKernel {
    struct Crop preCrop;
    struct Padding prePadding;
    struct Resize resize[PIPE_KERNEL_NUM];
    struct YuvScale yuvScale[PIPE_KERNEL_NUM];
    struct Crop postCrop[PIPE_KERNEL_NUM];
    struct Padding postPadding[PIPE_KERNEL_NUM];

    struct Flip flip;
    struct Mosaic mosaic;
    struct Rotate rotate;
    struct Cover cover;
    struct Osd osd;
    struct Histogram histogram;
    struct Lut lut;
    struct Blend blend;
    struct Hsv hsv;
    struct Filter filter;
    struct PixAug pixaug;
    struct Affine affine;
    struct Convert convert;
};

struct PipeLineOutput {
    struct Swap swap;
    struct UvUp uvUp;
    struct Csc csc;
    struct UvDown uvDown;
};

struct Channel {
    struct Cvdr cvdr;
    struct Cache cache;
    struct Rdma rdma;
    uint8_t earlyRunEn;
};

struct PipeLine {
    struct PipleLineTop top;
    struct PipeLineInput input;
    struct PipeLineKernel kernel;
    struct PipeLineOutput output[PIPE_OUT_NUM];
};

typedef struct Roi {
    uint32_t hmin;
    uint32_t hmax;
    uint32_t vmin;
    uint32_t vmax;
    uint32_t width;
    uint32_t height;
} roi_t;

typedef struct {
    struct Top top;
    struct Channel channel;
    struct PipeLine pipe;
} vpu_vpc_config_t;

void reset_pipeline(struct Top *top, struct Channel *channel, struct PipeLine *pipeline);

#endif // #ifndef VPC_CMDLIST_PIPELINE_TOP_H
